import Vue from 'vue'
import Router from 'vue-router'
import login from '@/components/login'
import home from '@/components/home'
import mine from '@/components/mine'
import substitute from '@/components/substitute'
import publish from '@/components/publish'
import course from '@/components/course'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'login',
      component: login
    },
    {
      path: '/login',
      name: 'login',
      component: login
    },
    {
      path: '/home',
      name: 'home',
      component: home,
      children: [{
        path: '/home',
        redirect: '/home/mine'
      }, {
        path: '/home/mine',
        name: 'mine',
        component: mine
      }, {
        path: '/home/substitute',
        name: 'substitute',
        component: substitute
      }, {
        path: '/home/publish',
        name: 'publish',
        component: publish
      }, {
        path: '/home/course',
        name: 'course',
        component: course
      }]
    }
  ]
})
